package oop;

public class Staff {
  private String name,sex,zhiwei;
  private int age,num;
  private double salary;
public Staff(String name, String sex, String zhiwei, int age, int num,
		double salary) {
	super();
	this.name = name;
	this.sex = sex;
	this.zhiwei = zhiwei;
	this.age = age;
	this.num = num;
	this.salary = salary;
}

@Override
public int hashCode() {
	final int prime = 31;
	int result = 1;
	result = prime * result + num;
	return result;
}

@Override
public boolean equals(Object obj) {
	if (this == obj)
		return true;
	if (obj == null)
		return false;
	if (getClass() != obj.getClass())
		return false;
	Staff other = (Staff) obj;
	if (num != other.num)
		return false;
	return true;
}

@Override
public String toString() {
	return "Staff [name=" + name + ", sex=" + sex + ", zhiwei=" + zhiwei
			+ ", age=" + age + ", num=" + num + ", salary=" + salary + "]";
}

public String getName() {
	return name;
}
public void setName(String name) {
	this.name = name;
}
public String getSex() {
	return sex;
}
public void setSex(String sex) {
	this.sex = sex;
}
public String getZhiwei() {
	return zhiwei;
}
public void setZhiwei(String zhiwei) {
	this.zhiwei = zhiwei;
}
public int getAge() {
	return age;
}
public void setAge(int age) {
	this.age = age;
}
public int getNum() {
	return num;
}
public void setNum(int num) {
	this.num = num;
}
public double getSalary() {
	return salary;
}
public void setSalary(double salary) {
	this.salary = salary;
}

  
}
